package com.hengpeng.itfinbase.persist;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Enumerated;

import com.hengpeng.common.web.annotation.HtmlInput;
import com.hengpeng.common.web.annotation.HtmlInputType;
import com.hengpeng.itfinbase.idAssign.AbstractAssign18IdEntity;

/**
 * <pre>
 * 微信合作商户信息表
 * </pre>
 * 
 * @author weiyuan
 * @version 1.0, 2014-7-21
 */
@Entity
public class WechatMerchant extends AbstractAssign18IdEntity {
    private static final long serialVersionUID = -2686873158368734415L;

    /**
     * <pre>
     * 合作商状态
     * </pre>
     */
    public static enum MerchantStatus {
        /**
         * 关闭
         */
        CLOSED("关闭"),
        /**
         * 打开
         */
        OPEN("打开");

        private String text;

        MerchantStatus(String text) {
            this.text = text;
        }

        public String getText() {
            return text;
        }

        public void setText(String text) {
            this.text = text;
        }
    }

    @HtmlInput(label = "合作商编号", maxLength = 40, type = HtmlInputType.TEXT, index = 1, nullable = false)
    private String merchantId;

    @HtmlInput(label = "合作商名称", maxLength = 40, type = HtmlInputType.TEXT, index = 2, nullable = false)
    private String merchantName;

    @HtmlInput(label = "合作商appId", maxLength = 40, type = HtmlInputType.TEXT, index = 3, nullable = false)
    private String appId;

    @HtmlInput(label = "合作商appsecret", type = HtmlInputType.TEXT, index = 4, nullable = false)
    private String appsecret;

    @HtmlInput(label = "合作商ToKen", type = HtmlInputType.TEXT, index = 5, nullable = false)
    private String toKen;

    @Enumerated(javax.persistence.EnumType.STRING)
    @HtmlInput(label = "合作状态", type = HtmlInputType.SELECT, index = 6, nullable = false, labelProperty = "text")
    private MerchantStatus status;

    @HtmlInput(label = "创建时间", type = HtmlInputType.LABEL, format = "yyyy-MM-dd HH:mm:ss", index = 7)
    private Date createTime;

    @HtmlInput(label = "活动编号", type = HtmlInputType.TEXT, index = 8, nullable = false)
    private String activityId;

    @HtmlInput(label = "最近更新时间", type = HtmlInputType.LABEL, format = "yyyy-MM-dd HH:mm:ss", index = 9)
    private Date lastUpdate;

    @HtmlInput(label = "法定人姓名", type = HtmlInputType.TEXT, index = 10, nullable = false)
    private String legalRealName;

    @HtmlInput(label = "法定人身份证", type = HtmlInputType.TEXT, index = 11, nullable = false)
    private String legalCardNumber;

    @HtmlInput(label = "合作商别名", type = HtmlInputType.TEXT, index = 13, nullable = false)
    private String merchantAlias;

    @HtmlInput(label = "商户logo", type = HtmlInputType.TEXT, index = 14, nullable = true)
    private String logoUrl;

    @HtmlInput(label = "商户备注", type = HtmlInputType.TEXT, index = 15, nullable = false)
    private String merchantRemarks;

    @HtmlInput(label = "活动标题", type = HtmlInputType.TEXT, index = 16, nullable = false)
    private String activityTitle;

    @HtmlInput(label = "序列批次号", type = HtmlInputType.TEXT, index = 20, nullable = true)
    @Column(length = 50)
    private String batchId;

    @HtmlInput(label = "商户首页地址", type = HtmlInputType.TEXT, index = 21, nullable = true)
    @Column(length = 200)
    private String merchantUrl;

    public String getMerchantUrl() {
        return merchantUrl;
    }

    public void setMerchantUrl(String merchantUrl) {
        this.merchantUrl = merchantUrl;
    }

    public String getBatchId() {
        return batchId;
    }

    public void setBatchId(String batchId) {
        this.batchId = batchId;
    }

    public String getActivityTitle() {
        return activityTitle;
    }

    public void setActivityTitle(String activityTitle) {
        this.activityTitle = activityTitle;
    }

    public String getMerchantRemarks() {
        return merchantRemarks;
    }

    public void setMerchantRemarks(String merchantRemarks) {
        this.merchantRemarks = merchantRemarks;
    }

    public String getLogoUrl() {
        return logoUrl;
    }

    public void setLogoUrl(String logoUrl) {
        this.logoUrl = logoUrl;
    }

    public String getMerchantAlias() {
        return merchantAlias;
    }

    public void setMerchantAlias(String merchantAlias) {
        this.merchantAlias = merchantAlias;
    }

    public String getLegalRealName() {
        return legalRealName;
    }

    public void setLegalRealName(String legalRealName) {
        this.legalRealName = legalRealName;
    }

    public String getLegalCardNumber() {
        return legalCardNumber;
    }

    public void setLegalCardNumber(String legalCardNumber) {
        this.legalCardNumber = legalCardNumber;
    }

    public String getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(String merchantId) {
        this.merchantId = merchantId;
    }

    public String getMerchantName() {
        return merchantName;
    }

    public void setMerchantName(String merchantName) {
        this.merchantName = merchantName;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getAppsecret() {
        return appsecret;
    }

    public void setAppsecret(String appsecret) {
        this.appsecret = appsecret;
    }

    public String getToKen() {
        return toKen;
    }

    public void setToKen(String toKen) {
        this.toKen = toKen;
    }

    public MerchantStatus getStatus() {
        return status;
    }

    public void setStatus(MerchantStatus status) {
        this.status = status;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getActivityId() {
        return activityId;
    }

    public void setActivityId(String activityId) {
        this.activityId = activityId;
    }

    public Date getLastUpdate() {
        return lastUpdate;
    }

    public void setLastUpdate(Date lastUpdate) {
        this.lastUpdate = lastUpdate;
    }

}